Learn REST APIs: Your guide to how to find, learn, and connect to the REST APIs that powers the Internet of Things revolution. by Gaitatzis Tony

Learn REST APIs: Your guide to how to find, learn, and connect to the REST APIs that powers the Internet of Things revolution. by Gaitatzis Tony

Author:Gaitatzis, Tony [Gaitatzis, Tony]
Language: eng
Format: epub
Publisher: BackupBrain Press
Published: 2020-11-27T16:00:00+00:00


api_key

1234

BASIC

Base64

BASIC YXBpX2tleToxMjM0

api_key

(none)

DIGEST

Base64

DIGEST YXBpX2tleQ==

session_token

(none)

BEARER

None

BEARER session_token

session_token

(none)

OAUTH

None

OAUTH session_token

Table 5.1: Common authorization schemes used in REST

In the case of BASIC Authorization, the login or API key is joined with the API secret or password with a colon (: )

and Base64 encoded. This Base64 encoded string is preceded by the authentication scheme, for example BASIC or DIGEST . In either case, the client sends the resulting string in the Authorization HTTP header.

Most programming languages support Base64 encoding and there are several websites that will encode and decode Base64 text for free. One such website is base64decode.org .

If an API requires DIGEST encoding for an API key, a full API request might look like this:

GET /path/to/endpoint​

Authorization: DIGEST YXBpX2tleQ==

Example 5.8: Possible api_key authentication request using DIGEST scheme

If an API requires BASIC encoding on login and password or an API key and secret, a full API request might look like this:

GET /path/to/endpoint​

Authorization: BASIC YXBpX2tleToxMjM0



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.